package com.shali.wechat.order.exception;

import com.shali.wechat.order.enums.ResultEnum;

public class OrderException extends RuntimeException{

	private static final long serialVersionUID = -8431321142682537887L;
	
	private Integer code;

	public OrderException(Integer code,String message) {
		super(message);
		this.code = code;
	}

	public OrderException(ResultEnum resultEnum) {
		super(resultEnum.getMessage());
		this.code = resultEnum.getCode();
	}
	
	public Integer getCode() {
		return code;
	}

}
